/**   
 * @Title: HealthNewsServiceImplementation.java 
 * @Package cn.edu.cdtu.healthserver.service.impl 
 * @Description: TODO 
 * @author  
 * @date  
 * @version V0.0   
 */
package cn.edu.cdtu.healthserver.service.impl;

import cn.edu.cdtu.healthserver.dao.HealthNewsDao;
import cn.edu.cdtu.healthserver.dao.impl.HealthNewsDaoImplementation;
import cn.edu.cdtu.healthserver.domain.HealthNewsJson;
import cn.edu.cdtu.healthserver.service.HealthNewsService;
import cn.edu.cdtu.healthserver.utils.ConnectUtil;

/** 
 * @ClassName: HealthNewsServiceImplementation 
 * @Description: TODO
 * @author 
 * @date 
 *  
 */
public class HealthNewsServiceImplementation implements HealthNewsService {

	private HealthNewsDao healthNewsDao=new HealthNewsDaoImplementation();
	
	/* (non-Javadoc)
	 * <p>Title: queryHealthNews</p> 
	 * <p>Description: </p> 
	 * @param id
	 * @param operation
	 * @return 
	 * @see cn.edu.scu.healthserver.service.HealthNewsService#queryHealthNews(int, java.lang.String)
	 */
	@Override
	public HealthNewsJson queryHealthNews(int id, String operation) {
		// TODO Auto-generated method stub
		HealthNewsJson healthNewsJson=null;
		if(ConnectUtil.HealthNewsPargrams
				.Option.OptionValue.HEALTH_NEWS_OPERATION_BODY.equals(operation))
		{
			healthNewsJson=healthNewsDao.queryBodyNews(id);
		}
		else
		{
			healthNewsJson=healthNewsDao.queryMentalNews(id);
		}
		return healthNewsJson;
	}

}
